package at.gv.bmwf.fons.model.ontology.static_impl;

import java.util.Collections;
import java.util.Set;

import at.gv.bmwf.fons.model.ontology.Atom;
import at.gv.bmwf.fons.model.ontology.Facet;
import at.gv.bmwf.fons.model.ontology.AtomFactory;
import at.gv.bmwf.fons.model.ontology.uris.VONT;

import com.google.common.collect.Sets;
import com.hp.hpl.jena.query.QuerySolution;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.rdf.model.Literal;
import com.hp.hpl.jena.rdf.model.Resource;

public class StaticAtom extends StaticResource implements Atom {
	private final Set<Facet> facets = Sets.newHashSet();
	
	public StaticAtom (Resource resource) {
		super(resource);
	}
	
	public void addFacet (Facet facet) {
		this.facets.add(facet);
	}
	
	@Override
	public Literal getValue() {
		return getResource().getProperty(VONT.hasValue).getLiteral();
	}

	@Override
	public Set<Facet> getFacets() {
		return Collections.unmodifiableSet(facets);
	}

}
